##############
# (*) Kaleidoscope
# By: Allan Spale
# June 2008

from Kaleidoscope.KSColumn import KSColumn

class KSColumnAdapted(KSColumn):
	"""
	Used as a class wrapper to make checking for types a bit easier later.
	This especially applies to classes that contain columns but are not
	descended from the KSColumn parent class.
	"""
	@property
	def u_database_name(self):
	    return super(KSColumnAdapted, self).u_database_name

	@property
	def u_key_type(self):
	    return super(KSColumnAdapted, self).u_key_type

	@property
	def b_unique_values(self):
	    return super(KSColumnAdapted, self).b_unique_values

	@property
	def mx_start_datetime(self):
	    return super(KSColumnAdapted, self).mx_start_datetime

	@property
	def mx_last_datetime(self):
	    return super(KSColumnAdapted, self).mx_last_datetime

	@property
	def uuid(self):
	    return super(KSColumnAdapted, self).uuid


	def __init__(self, u_database_name, mx_start_datetime, u_key_type,
				 	b_pack_key, b_unqiue_values):
	    """
	    See docstring in KSColumn for more information.

	    """
	    super(KSColumnAdapted, self).__init__(u_database_name, mx_start_datetime,
			u_key_type, b_pack_key, b_unqiue_values)


	def __del__(self):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).__del__()


	def set_unique_values_flag(self, b_flag):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).set_unique_values_flag(b_flag)


	def open(self, i_flags, i_permissions, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).open(i_flags, i_permissions,
			kstx_parent_transaction)


	def close(self):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).close()


	def get_data_from_key(self, obj_key, kstx_parent_transaction,
	                          b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).get_data_from_key(obj_key,
			kstx_parent_transaction, b_return_packed_data)


	def get_keys_from_data_value(self, obj_target_data,
	                             kstx_parent_transaction, b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
	   	return super(KSColumnAdapted, self).get_keys_from_data_value(
			obj_target_data, kstx_parent_transaction, b_return_packed_data)


	def get_keys_from_data_object_range(self, obj_start_data, obj_end_data,
	        i_low_comparison_operator, i_high_comparison_operator,
	        kstx_parent_transaction, b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).get_keys_from_data_object_range(
			obj_start_data, obj_end_data, i_low_comparison_operator,
			i_high_comparison_operator, kstx_parent_transaction,
			b_return_packed_data)


	def get_data_objects_from_key_range(self, obj_start_key, obj_end_key,
	        i_low_comparison_operator, i_high_comparison_operator,
	        kstx_parent_transaction, b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).get_data_objects_from_key_range(
			obj_start_key, obj_end_key, i_low_comparison_operator,
			i_high_comparison_operator, kstx_parent_transaction,
			b_return_packed_data)


	def has_key(self, obj_key, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).has_key(
			obj_key, kstx_parent_transaction)


	def has_value(self, obj_value, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).has_value(
			obj_value, kstx_parent_transaction)


	def insert_item_with_key_value_pair(self, obj_key, obj_data,
	                                        kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).insert_item_with_key_value_pair(
			obj_key, obj_data, kstx_parent_transaction)


	def insert_value_and_generate_key(self, obj_data, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).insert_value_and_generate_key(
			obj_data, kstx_parent_transaction)


	def insert_items_with_key_and_value_list(self, obj_key, list_values,
	                                             kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).\
			insert_items_with_key_and_value_list(
				obj_key, list_values, kstx_parent_transaction)


	def change_key(self, obj_old_key, obj_new_key, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).change_key(
			obj_old_key, obj_new_key, kstx_parent_transaction)


	def change_all_data_values(self, obj_old_data_value, obj_new_data_value,
	                               kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).change_all_data_values(
			obj_old_data_value, obj_new_data_value, kstx_parent_transaction)


	def change_key_value_pair(self, obj_key, obj_data, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).change_key_value_pair(
			obj_key, obj_data, kstx_parent_transaction)


	def delete_item_by_key(self, obj_key, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).delete_item_by_key(
			obj_key, kstx_parent_transaction)


	def delete_items_by_value_list(self, list_values, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).delete_items_by_value_list(
			list_values, kstx_parent_transaction)


	def get_all(self, kstx_parent_transaction, b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).get_all(
			kstx_parent_transaction, b_return_packed_data)


	def values(self, kstx_parent_transaction, b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).values(
			kstx_parent_transaction, b_return_packed_data)


	def keys(self, kstx_parent_transaction, b_return_packed_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).keys(
			kstx_parent_transaction, b_return_packed_data)


	def reorganize_keys(self, kstx_parent_transaction):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).reorganize_keys(
			kstx_parent_transaction)


	def generate_id(self):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).generate_id()


	def pack_key(self, obj_key):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).pack_key(obj_key)


	def unpack_key(self, obj_key, u_type):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).unpack_key(obj_key, u_type)


	def pickle_data(self, obj_unpickled_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).pickle_data(obj_unpickled_data)


	def unpickle_data(self, obj_pickled_data):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).unpickle_data(obj_pickled_data)


	def custom_unpickle_data(self, obj_key, u_type):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).custom_unpickle_data(
			obj_key, u_type)


	def get_comparison_function(self, i_comparison_operator):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).get_comparison_function(
			i_comparison_operator)


	def change_datetimes(self, mx_start_datetime, mx_last_datetime):
		"""
		See docstring in KSColumn for more information.

		"""
		return super(KSColumnAdapted, self).change_datetimes(
			mx_start_datetime, mx_last_datetime)